/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.fee.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.fee.entity.PaymentDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 付款单明细表MAPPER接口
 * @author weisong
 * @version 2017-09-20
 */
@MyBatisMapper
public interface PaymentDetailMapper extends BaseMapper<PaymentDetail> {
    // 关联付款单明细表
    public List<PaymentDetail> findPaymentDetailById(String id);

    // 计算核销总金额
    public List<PaymentDetail> findVcaMoneyById(@Param("id")String id, @Param("invoiceId")String invoiceId,
                                                   @Param("invoiceDetailId")String invoiceDetailId);

    //查看本次核销金额
    public List<PaymentDetail> findInvoiceMoneyById(@Param("id")String id,@Param("invoiceId")String invoiceId);

    //根据发票子表id查付款单子表
    public List<PaymentDetail> findAllByPayInvoiceDetail(String id);

    //根据发票id获取付款单子表
    public List<PaymentDetail> findPaymentDetailByInvoiceId(String invoiceId, String detailId );
}